
<script>
$(document).ready(function(){ 
   
    $("#dialog").dialog({ title: '<?=ucfirst($this->actionName) .' '.ucfirst($this->controllerName)?> ' });

    $('input[name="hora_inicio"]').timepicker({
        timeOnlyTitle: 'Elegir una hora',
		showSecond: false,
		timeFormat: 'hh:mm:ss'
	});
    
    $('input[name="duracion"]').timepicker({
        timeOnlyTitle: 'Duración',
		showSecond: false,
		timeFormat: 'hh:mm'
	});
})

function processRow(data)
{
   if(data.fila.id)
   {
        $('#fila-'+data.fila.id).find('a').first().html(data.fila.duracion +' '+data.fila.nombre)
   }else
   {
        $('#'+data.divfecha).find('ul').append(data.fila)
   }
   
   $("#dialog").dialog('close')
   
}

</script>

<?php
$this->form->setAction($this->url())->setAttrib('id', 'ajax_form');

echo $this->form;

echo $this->partial('form_js.phtml', 
    array(	
        'actionName'=>$this->actionName,
        'id'=>$this->id,
        'id_tablesorter'=>$this->id_tablesorter,
        )
);


?>
